package com.jackiechan.day15.lang;

public class TThread extends java.lang.Thread {
    public static void main(String[] args) throws InterruptedException {
        TThread thread = new TThread();
        TThread thread1 = new TThread();
        thread.start();
        thread1.start();
        System.out.println(thread.getId());
        System.out.println(thread.getName());
        thread.setName("run");
        System.out.println(thread.getName());
        System.out.println(thread.toString());
        TThread.sleep(10);
        System.out.println(TThread.currentThread());
    }
    @Override
    public void run() {
        for (int i = 1; i < 10; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.print("* ");
            }
            System.out.println(this.getName());
        }
    }
}
